[ENG-46087] fix(webkit): table select-all tri-state (page-aware) and header-cell sorting#706
Draft
HerbertJulio wants to merge 2 commits into
Draft
[ENG-46087] fix(webkit): table select-all tri-state (page-aware) and header-cell sorting#706HerbertJulio wants to merge 2 commits into
HerbertJulio wants to merge 2 commits into
Conversation
…header-cell sorting Select-all header checkbox now reflects the current page's selection as a tri-state: checked when all page rows are selected, indeterminate when some are, unchecked when none. Switches to TanStack's page-scoped getIsAllPageRowsSelected / getIsSomePageRowsSelected / toggleAllPageRowsSelected (falls back to the full filtered model when the table is not paginated, so the non-paginated behavior is unchanged). Sorting now triggers from the whole sortable header cell — a pointer click anywhere on it, or Enter/Space while focused — in addition to the sort button. The sort button stops its own click/keydown from bubbling so activating it never double-toggles. Sortable headers are focusable with a focus-visible ring, matching the spec's accessibility intent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two behavior fixes to the data-driven
Tableselection and sorting, with no changes to the public API (no new props/events/slots/exports).Select-all header checkbox — page-aware tri-state. The header select-all checkbox now reflects the current page's selection as a proper tri-state:
It switches from the all-rows TanStack methods to the page-scoped ones (
getIsAllPageRowsSelected/getIsSomePageRowsSelected/toggleAllPageRowsSelected). Previously it used all-rows semantics, so on a paginated table selecting every visible row read as "some of N" and never reached the checked state.Sorting from the whole header cell. Sorting now triggers from the entire sortable header cell — a pointer click anywhere on it, or
Enter/Spacewhile it's focused — in addition to the existing sort button. The sort button stops its own click/keydown from bubbling so activating it never double-toggles. Sortable headers are focusable with a focus-visible ring, matching the spec's accessibility intent ("Tab focuses sortable headers; Enter/Space toggles a sortable header").Notes
getPaginationRowModel()falls back to the full filtered row model when pagination isn't enabled, so page-scoped selection behaves identically to all-rows in that case.indeterminateprop and the existingsortevent.vue-tsc, spec-compliance and references validators all pass; both SFCs compile; changes confirmed live in Storybook.Relates to ENG-46087.